﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace YuFeng.Models.Product
{
    public class Product : ModelBase
    {
        public Product()
        {
            Id = Guid.NewGuid().ToString("n");
        }
        /// <summary>
        /// 系统编号
        /// </summary>
        [Key]
        [Required]
        [StringLength(128)]
        public string Id { get; set; }
        /// <summary>
        /// 新闻标题
        /// </summary>
        [Required]
        [StringLength(200)]
        public string Name { get; set; }
        /// <summary>
        /// 新闻摘要
        /// </summary>
        [StringLength(300)]
        public string Summary { get; set; }
        /// <summary>
        /// 分类
        /// </summary>
        public int Type { get; set; }
        /// <summary>
        /// 一级分类
        /// </summary>
        public string LevelTypeOne { get; set; }
        /// <summary>
        /// 二级分类
        /// </summary>
        public int? LevelTypeTwo { get; set; }
        /// <summary>
        /// 标题图片
        /// </summary>
        public string TitleImg { get; set; }
        /// <summary>
        /// 产品内容
        /// </summary>
        [Required]
        public string Content { get; set; }
        [Required]
        public bool IsIndex { get; set; }
    }
}
